﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using Meqs.Entity;
using Meqs.Entity.Views;

namespace Meqs.Logic.Interface
{
    public interface IEvalSettingsLogic : IMultiCommonLogic<EvalSettings, int>
    {
        /// <summary>
        /// 查询评估设置列表
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<EvalSettingsExtend> FindExtend(string schoolMark);

        /// <summary>
        /// 查询评估设置列表
        /// </summary>
        /// <param name="evalType"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<EvalSettingsExtend> FindExtendGrade(EvalType evalType, string schoolMark);

        /// <summary>
        /// 查询评估设置列表
        /// </summary>
        /// <param name="causeId"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<EvalSettingsExtend> FindExtend(int causeId, string schoolMark);

        /// <summary>
        /// 查询评估设置列表
        /// </summary>
        /// <param name="gradeIndex"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<EvalSettingsExtend> FindExtendGrade(int gradeIndex, string schoolMark);

        /// <summary>
        /// 查询评估设置列表
        /// </summary>
        /// <param name="id"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        EvalSettingsExtend FindExtendById(int id, string schoolMark);
        
        /// <summary>
        /// 获取本校教研组
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<GlobalCauseInfo> GetResearchGroupList(string schoolMark);

        /// <summary>
        /// 获取本校年级组
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<int> GetGradeList(string schoolMark);

        /// <summary>
        /// 插入评估设置
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="teachCode"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        int SaveEvalSettings(EvalSettings settings, string teachCode, string schoolMark);

        /// <summary>
        /// 更新评估设置
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="teachCode"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        int UpdateEvalSettings(EvalSettings settings, string teachCode, string schoolMark);

        /// <summary>
        /// 判断用户是否已被设置
        /// </summary>
        /// <param name="id"></param>
        /// <param name="teachCode"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        bool ExistsTeacher(int id, string teachCode, string schoolMark);

        /// <summary>
        /// 判断用户是否已被设置
        /// </summary>
        /// <param name="id"></param>
        /// <param name="teachCode"></param>
        /// <param name="schoolMark"></param>
        /// <param name="evalType"></param>
        /// <returns></returns>
        bool ExistsTeacher(int id, string teachCode, string schoolMark, EvalType evalType);

        /// <summary>
        /// 判断用户是否已被设置
        /// </summary>
        /// <param name="teachID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        bool ExistsTeacher(int teachID, string schoolMark);

        /// <summary>
        /// 判断用户是否已被设置
        /// </summary>
        /// <param name="teachID"></param>
        /// <param name="schoolMark"></param>
        /// <param name="evalType"></param>
        /// <returns></returns>
        bool ExistsTeacher(int teachID, string schoolMark, EvalType evalType);

        /// <summary>
        /// 查询评价分配明细
        /// </summary>
        /// <param name="causeID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        DataTable GetSettingsDetail(int causeID, EvalType evalType, string schoolMark);

        /// <summary>
        /// 查询评价分配明细
        /// </summary>
        /// <param name="gradeIndex"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        DataTable GetSettingsDetailGrade(int gradeIndex, string schoolMark);

        /// <summary>
        /// 获取教研组列表字符串
        /// </summary>
        /// <param name="teacherID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        string GetResearchIDStringByTeacher(int teacherID, string schoolMark);

        /// <summary>
        /// 获取教研组列表
        /// </summary>
        /// <param name="teacherID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<int> GetResearchIDListByTeacher(int teacherID, string schoolMark);

        /// <summary>
        /// 获取年级组列表字符串
        /// </summary>
        /// <param name="teacherID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        string GetGradeIndexStringByTeacher(int teacherID, string schoolMark);

        /// <summary>
        /// 获取年级组列表
        /// </summary>
        /// <param name="teacherID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<int> GetGradeIndexListByTeacher(int teacherID, string schoolMark);
    }
}
